import http from "@/utils/request";
//预约列表
export function appointmentListAPI()
{
	return http.request({
		url: "appointment/list",
		method: "get",
	});
}
export function appointmentSearchListAPI()
{
	return http.request({
		url: "appointment/search",
		method: "get",
	});
}
//=============================
//2.取消预约（可以删除多条记录）
// 参数名         参数说明
// ids  多个编号(流水号)，用","分割"
export function deleteAppointmentAPI(ids)
{
	return http.request({
		url: "appointment/delete",
		method: "get",
		params: {
			ids
		},
	});
}

//==============================
//3.添加预约
// 参数名         参数说明
// apponintment_id   商品编号
export function addAppointmentAPI(params)
{
	return http.request({
		url: "appointment/add",
		method: "post",
		data: params,
	});
}

//===============================================
// 根据预约编号获取对应的预约详情
// 参数名	参数说明	备注
// id	预约商品编号
export function getAppointmentDetailByIdAPI(id) {
	return http.request({
		url: "appointment/detail",
		method: "get",
		params: {id},
	});

}

//查询is_checked
export function ischeckedAppointmentAPI(params)
{
	return http.request({
		url: "appointment/select",
		method: "post",
		data: params,
	});
}
//查询已经预约了的列表
export function appointmentSelectListAPI()
{
	return http.request({
		url: "appointment/selectlist",
		method: "get",
	});
}

